#include <createFileOnDisk.h>
#include <fstream>
#include <cstring>

//
bool CreateNullFile(string filename, int size) 
{
    fstream file;
    file.open(filename, ios::binary | ios::out);
    if(file.fail())
    {
    	return false;
    }
    char buf[1024];
    int count = 1024;
    while(size > 0)
    {
    	if(count > size) count = size;
    	file.write(buf, count);
    	size -= count;
    }
    file.close();
    
    return true;
}
